package com.hanson.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @CLassName MybatisPlusProperties
 * @Description mybatisplus配置的属性
 * @Author HansonLee
 * @Date 2020/10/30 15:15
 **/
@Data
@Component
@ConfigurationProperties(prefix = "hanson", ignoreUnknownFields = false)
public class MybatisPlusProperties implements Serializable {

    private final MybatisPlus mybatisPlus= new MybatisPlus();

    @Data
    public static class MybatisPlus{
        //项目默认路径
        private String defaultProjectPath = System.getProperty("user.dir") + "/src/main/java";
        //项目路径
        private String projectPath;
        //作者名称
        private String author;
        //数据库url
        private String url;
        //数据库驱动名
        private String driver;
        //数据库用户名
        private String userName;
        //数据库密码
        private String password;
        //待生成模块名
        private String moduleName;
        //生成父路径
        private String parent;
        //实体类生成路径
        private String entityUrl;
        //mapper接口生成路径
        private String mapperUrl;
        //mapper.xml生成路径
        private String xmlUrl;
        //service接口生成路径
        private String serviceUrl;
        //serviceImpl接口生成路径
        private String serviceImplUrl;
        //controller接口生成路径
        private String controllerUrl;
        //实体类模板路径
        private String entityTemplatePath;
        //mapper接口模板路径
        private String mapperTemplatePath;
        //service接口模板路径
        private String serviceTemplatePath;
        //serviceImpl接口模板路径
        private String serviceImplTemplatePath;
        //controller接口模板路径
        private String controllerTemplatePath;
        //xml模板路径
        private String xmlTemplatePath;
        //需要生成模板的表名称，逗号分隔，需要和数据库路径下的表名称一致
        private String include;
        //是否oracle数据库，因为oracle读取数据库表需要大写
        private Boolean ifOracle;

    }

}
